
class Dog{
    public String name;
    public int age;

    public void eat(){
        System.out.println(name+"吃狗粮");
    }
}


public class Test {

    public static void main(String[] args) {
        Dog dog1=new Dog();
        dog1.name="小黑";
        dog1.age=16;
        dog1.eat();
        System.out.println(dog1.name);
        System.out.println(dog1.age);


        System.out.println("======================");
        Dog dog2=new Dog();
        dog2.name="小黄";
        dog2.age=20;
        dog2.eat();
        System.out.println(dog2.name);
        System.out.println(dog2.age);
    }
}
